/*
 //  JSONDownloader.h
 //  TextDownloader
 //
 //  Created by Brennan Stehling on 10/25/09.
 //  Copyright 2009 SmallSharpTools LLC. All rights reserved.
 */

#import <Foundation/Foundation.h>
#import "TextDownloader.h"

// declaration of an optional method for a delegate
@protocol JSONDownloadDelegate
@optional
- (void) downloadJSONFinished: (NSDictionary *) dictionary;
- (void) downloadJSONFailed: (NSString *) errorMessage;
- (void) parsingJSONFailed: (NSString *) errorMessage;
@end

@interface JSONDownloader : NSObject <JSONDownloadDelegate, TextDownloadDelegate> {
	id					_delegate;
}

@property (nonatomic, retain)	id	delegate;

- (void)downloadJSON:(NSString *)urlString delegate:(id)delegate;

@end
